3.3.87 \(\int \text {sech}(c+d x) (a+b \sinh ^2(c+d x)) \, dx\) [287]

Optimal. Leaf size=28 \[ \frac {(a-b) \text {ArcTan}(\sinh (c+d x))}{d}+\frac {b \sinh (c+d x)}{d} \]

[Out]

(a-b)*arctan(sinh(d*x+c))/d+b*sinh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3269, 396, 209} \begin {gather*} \frac {(a-b) \text {ArcTan}(\sinh (c+d x))}{d}+\frac {b \sinh (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sech[c + d*x]*(a + b*Sinh[c + d*x]^2),x]

[Out]

((a - b)*ArcTan[Sinh[c + d*x]])/d + (b*Sinh[c + d*x])/d

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 396

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*x*((a + b*x^n)^(p + 1)/(b*(n*(
p + 1) + 1))), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 3269

Int[cos[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b*ff^2*x^2)^p, x], x, Sin[e +
f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \text {sech}(c+d x) \left (a+b \sinh ^2(c+d x)\right ) \, dx &=\frac {\text {Subst}\left (\int \frac {a+b x^2}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {b \sinh (c+d x)}{d}+\frac {(a-b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {(a-b) \tan ^{-1}(\sinh (c+d x))}{d}+\frac {b \sinh (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 37, normalized size = 1.32 \begin {gather*} \frac {a \text {ArcTan}(\sinh (c+d x))}{d}-\frac {b \text {ArcTan}(\sinh (c+d x))}{d}+\frac {b \sinh (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sech[c + d*x]*(a + b*Sinh[c + d*x]^2),x]

[Out]

(a*ArcTan[Sinh[c + d*x]])/d - (b*ArcTan[Sinh[c + d*x]])/d + (b*Sinh[c + d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.83, size = 34, normalized size = 1.21

method result size
derivativedivides \(\frac {2 a \arctan \left ({\mathrm e}^{d x +c}\right )+b \left (\sinh \left (d x +c \right )-2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) \(34\)
default \(\frac {2 a \arctan \left ({\mathrm e}^{d x +c}\right )+b \left (\sinh \left (d x +c \right )-2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) \(34\)
risch \(\frac {b \,{\mathrm e}^{d x +c}}{2 d}-\frac {{\mathrm e}^{-d x -c} b}{2 d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a}{d}-\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) b}{d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{d}+\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) b}{d}\) \(97\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sech(d*x+c)*(a+b*sinh(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(2*a*arctan(exp(d*x+c))+b*(sinh(d*x+c)-2*arctan(exp(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 56, normalized size = 2.00 \begin {gather*} \frac {1}{2} \, b {\left (\frac {4 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (d x + c\right )}}{d} - \frac {e^{\left (-d x - c\right )}}{d}\right )} + \frac {a \arctan \left (\sinh \left (d x + c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)*(a+b*sinh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*b*(4*arctan(e^(-d*x - c))/d + e^(d*x + c)/d - e^(-d*x - c)/d) + a*arctan(sinh(d*x + c))/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (28) = 56\).
time = 0.39, size = 101, normalized size = 3.61 \begin {gather*} \frac {b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 4 \, {\left ({\left (a - b\right )} \cosh \left (d x + c\right ) + {\left (a - b\right )} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - b}{2 \, {\left (d \cosh \left (d x + c\right ) + d \sinh \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)*(a+b*sinh(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 4*((a - b)*cosh(d*x + c) + (a -
 b)*sinh(d*x + c))*arctan(cosh(d*x + c) + sinh(d*x + c)) - b)/(d*cosh(d*x + c) + d*sinh(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sinh ^{2}{\left (c + d x \right )}\right ) \operatorname {sech}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)*(a+b*sinh(d*x+c)**2),x)

[Out]

Integral((a + b*sinh(c + d*x)**2)*sech(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 40, normalized size = 1.43 \begin {gather*} \frac {4 \, {\left (a - b\right )} \arctan \left (e^{\left (d x + c\right )}\right ) + b e^{\left (d x + c\right )} - b e^{\left (-d x - c\right )}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sech(d*x+c)*(a+b*sinh(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(4*(a - b)*arctan(e^(d*x + c)) + b*e^(d*x + c) - b*e^(-d*x - c))/d

________________________________________________________________________________________

Mupad [B]
time = 1.78, size = 88, normalized size = 3.14 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (a\,\sqrt {d^2}-b\,\sqrt {d^2}\right )}{d\,\sqrt {a^2-2\,a\,b+b^2}}\right )\,\sqrt {a^2-2\,a\,b+b^2}}{\sqrt {d^2}}-\frac {b\,{\mathrm {e}}^{-c-d\,x}}{2\,d}+\frac {b\,{\mathrm {e}}^{c+d\,x}}{2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sinh(c + d*x)^2)/cosh(c + d*x),x)

[Out]

(2*atan((exp(d*x)*exp(c)*(a*(d^2)^(1/2) - b*(d^2)^(1/2)))/(d*(a^2 - 2*a*b + b^2)^(1/2)))*(a^2 - 2*a*b + b^2)^(
1/2))/(d^2)^(1/2) - (b*exp(- c - d*x))/(2*d) + (b*exp(c + d*x))/(2*d)

________________________________________________________________________________________